package cn.wen.yaling.xo.service;

import cn.wen.yaling.commons.utils.ResultEntity;
import cn.wen.yaling.commons.vo.ResourceAddVO;
import cn.wen.yaling.commons.vo.ResourceListVO;
import cn.wen.yaling.commons.vo.ResourceUpdateVO;
import cn.wen.yaling.commons.vo.ResourceVO;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.wen.yaling.commons.utils.PageUtils;
import cn.wen.yaling.commons.entity.ResourcesEntity;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author FY
 * @email 932043654@qq.com
 * @date 2022-08-13 02:07:37
 */
public interface ResourcesService extends IService<ResourcesEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 获取全部的资源
     * @return
     */
    List<ResourceVO> getAllResources();

    /**
     * 添加资源数据
     * @param resourceAddVO
     * @return
     */
    ResultEntity addResource(ResourceAddVO resourceAddVO);

    /**
     * 后台获取全部的资源记录
     * @return
     */
    List<ResourceListVO> getResourceList();

    /**
     * 模糊查询
     * @param resourceName
     * @return
     */
    List<ResourceListVO> searchResource(String resourceName);

    /**
     * 更新资源信息
     * @param resourceUpdateVO
     * @return
     */
    ResultEntity updateResource(ResourceUpdateVO resourceUpdateVO);

    /**
     * 通过 Id 删除资源
     * @param resourceIds
     * @return
     */
    ResultEntity deleteByIds(Integer[] resourceIds);

    /**
     * 修改状态
     * @param resourceId
     * @param status
     * @return
     */
    ResultEntity updateResourceStatus(Integer resourceId, Integer status);

    /**
     * 获取一级二级分类的列表
     * @return
     */
    ResultEntity getAllSortList();

}

